<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模糊搜索</title>
    <script src="../vue.js"></script>

</head>

<body>
    <div id="box">
        <input type="text" name="" id="" v-model="mytext">
        {{mytext}}
        <ul>
            <template v-for="item in dataList">
                <li v-if:="item.includes(mytext)" :key="item">
                    {{item}}
                </li>
            </template>
        </ul>
    </div>
    <script>
        let obj = {
            data() {
                return {
                    mytext: '123',
                    dataList: ['aaa', 'bbb', 'ccc', 'aab', 'bba', 'ccb', 'cca', 'aac', 'abc', 'bca', 'cab', 'abb', 'acb']
                }
            },
        }
        Vue.createApp(obj).mount('#box')
    </script>
</body>

</html>